package com.miplus.ccrm.core.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 信用卡已出/未出账单流水表T+1
 * @TableName credit_account_event_dtl
 */
@TableName(value ="credit_account_event_dtl")
@Data
public class CreditAccountEventDtl implements Serializable {
    /**
     * 序号
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 账号
     */
    private String acctnbr;

    /**
     * 银行代号（匹配接口备用）
     */
    private Integer bank;

    /**
     * 银数交易日期
     */
    private Integer batchDay;

    /**
     * 通联交易日期、银数入账日期
     */
    private Integer inpDate;

    /**
     * 交易时间
     */
    private Integer inpTime;

    /**
     * 收单商户编号
     */
    private String merchant;

    /**
     * 交易月份（匹配接口备用）
     */
    private Integer monthNbr;

    /**
     * 交易流水号
     */
    private Long xtranno;

    /**
     * 交易类型
     */
    private String transType;

    /**
     * 通联入账日期
     */
    private Integer valDate;

    /**
     * 商户编号（匹配接口备用）
     */
    private String acptorId;

    /**
     * 授权码
     */
    private String authCode;

    /**
     * 记账金额
     */
    private BigDecimal billAmt;

    /**
     * 记账金额符号
     */
    private String billAmtflag;

    /**
     * 卡号
     */
    private String cardNbr;

    /**
     * 记账币种
     */
    private Integer currncyCd;

    /**
     * 交易描述1
     */
    private String desLine1;

    /**
     * 交易描述2
     */
    private String desLine2;

    /**
     * 商户类别
     */
    private Integer merCatCd;

    /**
     * 原始交易金额
     */
    private Long orgnAmt;

    /**
     * 原始交易金额符号
     */
    private String orgnAmtflag;

    /**
     * 原始币种
     */
    private Integer orgnCurr;

    /**
     * 交易表数据日期
     */
    private Date txRowDate;

    /**
     * 创建时间
     */
    private Date crdt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CreditAccountEventDtl other = (CreditAccountEventDtl) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAcctnbr() == null ? other.getAcctnbr() == null : this.getAcctnbr().equals(other.getAcctnbr()))
            && (this.getBank() == null ? other.getBank() == null : this.getBank().equals(other.getBank()))
            && (this.getBatchDay() == null ? other.getBatchDay() == null : this.getBatchDay().equals(other.getBatchDay()))
            && (this.getInpDate() == null ? other.getInpDate() == null : this.getInpDate().equals(other.getInpDate()))
            && (this.getInpTime() == null ? other.getInpTime() == null : this.getInpTime().equals(other.getInpTime()))
            && (this.getMerchant() == null ? other.getMerchant() == null : this.getMerchant().equals(other.getMerchant()))
            && (this.getMonthNbr() == null ? other.getMonthNbr() == null : this.getMonthNbr().equals(other.getMonthNbr()))
            && (this.getXtranno() == null ? other.getXtranno() == null : this.getXtranno().equals(other.getXtranno()))
            && (this.getTransType() == null ? other.getTransType() == null : this.getTransType().equals(other.getTransType()))
            && (this.getValDate() == null ? other.getValDate() == null : this.getValDate().equals(other.getValDate()))
            && (this.getAcptorId() == null ? other.getAcptorId() == null : this.getAcptorId().equals(other.getAcptorId()))
            && (this.getAuthCode() == null ? other.getAuthCode() == null : this.getAuthCode().equals(other.getAuthCode()))
            && (this.getBillAmt() == null ? other.getBillAmt() == null : this.getBillAmt().equals(other.getBillAmt()))
            && (this.getBillAmtflag() == null ? other.getBillAmtflag() == null : this.getBillAmtflag().equals(other.getBillAmtflag()))
            && (this.getCardNbr() == null ? other.getCardNbr() == null : this.getCardNbr().equals(other.getCardNbr()))
            && (this.getCurrncyCd() == null ? other.getCurrncyCd() == null : this.getCurrncyCd().equals(other.getCurrncyCd()))
            && (this.getDesLine1() == null ? other.getDesLine1() == null : this.getDesLine1().equals(other.getDesLine1()))
            && (this.getDesLine2() == null ? other.getDesLine2() == null : this.getDesLine2().equals(other.getDesLine2()))
            && (this.getMerCatCd() == null ? other.getMerCatCd() == null : this.getMerCatCd().equals(other.getMerCatCd()))
            && (this.getOrgnAmt() == null ? other.getOrgnAmt() == null : this.getOrgnAmt().equals(other.getOrgnAmt()))
            && (this.getOrgnAmtflag() == null ? other.getOrgnAmtflag() == null : this.getOrgnAmtflag().equals(other.getOrgnAmtflag()))
            && (this.getOrgnCurr() == null ? other.getOrgnCurr() == null : this.getOrgnCurr().equals(other.getOrgnCurr()))
            && (this.getTxRowDate() == null ? other.getTxRowDate() == null : this.getTxRowDate().equals(other.getTxRowDate()))
            && (this.getCrdt() == null ? other.getCrdt() == null : this.getCrdt().equals(other.getCrdt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAcctnbr() == null) ? 0 : getAcctnbr().hashCode());
        result = prime * result + ((getBank() == null) ? 0 : getBank().hashCode());
        result = prime * result + ((getBatchDay() == null) ? 0 : getBatchDay().hashCode());
        result = prime * result + ((getInpDate() == null) ? 0 : getInpDate().hashCode());
        result = prime * result + ((getInpTime() == null) ? 0 : getInpTime().hashCode());
        result = prime * result + ((getMerchant() == null) ? 0 : getMerchant().hashCode());
        result = prime * result + ((getMonthNbr() == null) ? 0 : getMonthNbr().hashCode());
        result = prime * result + ((getXtranno() == null) ? 0 : getXtranno().hashCode());
        result = prime * result + ((getTransType() == null) ? 0 : getTransType().hashCode());
        result = prime * result + ((getValDate() == null) ? 0 : getValDate().hashCode());
        result = prime * result + ((getAcptorId() == null) ? 0 : getAcptorId().hashCode());
        result = prime * result + ((getAuthCode() == null) ? 0 : getAuthCode().hashCode());
        result = prime * result + ((getBillAmt() == null) ? 0 : getBillAmt().hashCode());
        result = prime * result + ((getBillAmtflag() == null) ? 0 : getBillAmtflag().hashCode());
        result = prime * result + ((getCardNbr() == null) ? 0 : getCardNbr().hashCode());
        result = prime * result + ((getCurrncyCd() == null) ? 0 : getCurrncyCd().hashCode());
        result = prime * result + ((getDesLine1() == null) ? 0 : getDesLine1().hashCode());
        result = prime * result + ((getDesLine2() == null) ? 0 : getDesLine2().hashCode());
        result = prime * result + ((getMerCatCd() == null) ? 0 : getMerCatCd().hashCode());
        result = prime * result + ((getOrgnAmt() == null) ? 0 : getOrgnAmt().hashCode());
        result = prime * result + ((getOrgnAmtflag() == null) ? 0 : getOrgnAmtflag().hashCode());
        result = prime * result + ((getOrgnCurr() == null) ? 0 : getOrgnCurr().hashCode());
        result = prime * result + ((getTxRowDate() == null) ? 0 : getTxRowDate().hashCode());
        result = prime * result + ((getCrdt() == null) ? 0 : getCrdt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", acctnbr=").append(acctnbr);
        sb.append(", bank=").append(bank);
        sb.append(", batchDay=").append(batchDay);
        sb.append(", inpDate=").append(inpDate);
        sb.append(", inpTime=").append(inpTime);
        sb.append(", merchant=").append(merchant);
        sb.append(", monthNbr=").append(monthNbr);
        sb.append(", xtranno=").append(xtranno);
        sb.append(", transType=").append(transType);
        sb.append(", valDate=").append(valDate);
        sb.append(", acptorId=").append(acptorId);
        sb.append(", authCode=").append(authCode);
        sb.append(", billAmt=").append(billAmt);
        sb.append(", billAmtflag=").append(billAmtflag);
        sb.append(", cardNbr=").append(cardNbr);
        sb.append(", currncyCd=").append(currncyCd);
        sb.append(", desLine1=").append(desLine1);
        sb.append(", desLine2=").append(desLine2);
        sb.append(", merCatCd=").append(merCatCd);
        sb.append(", orgnAmt=").append(orgnAmt);
        sb.append(", orgnAmtflag=").append(orgnAmtflag);
        sb.append(", orgnCurr=").append(orgnCurr);
        sb.append(", txRowDate=").append(txRowDate);
        sb.append(", crdt=").append(crdt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}